﻿using System;
using System.Collections.Generic;
using System.IO;
using SmartLibrary.Domain.Interfaces.Repository;

namespace SmartLibrary.Domain.Entities
{
	public class Book
	{
		private readonly IFileRepository _fileRepository;

		public Book(IFileRepository fileRepository)
		{
			_fileRepository = fileRepository;
		}

		public Guid Id { get; internal set; }

		public List<string> Titles { get; internal set; }

		public int Year { get; set; }

		public string Description { get; set; }

		public string ISBN { get; set; }

		public string BBK { get; set; }

		public string Contents { get; set; }

		public FileStream Cover { get; set; }

		public List<Author> Authors { get; internal set; }

		public IEnumerable<BookFile> Files { get { return _fileRepository.GetFiles(this); } } 
	}
}